package com.yilijk.dialog;

import android.content.Context;
import android.view.Display;
import android.view.WindowManager;

/**
 * Created by SHICHENG
 * <p>
 * Time on 2021/11/08
 */
public class AlertDialogUtils {

    //获取屏幕的宽度
    public static int getScreenWidth(Context context) {
        WindowManager manager = (WindowManager) context
                .getSystemService(Context.WINDOW_SERVICE);
        Display display = manager.getDefaultDisplay();
        return display.getWidth();
    }
    //获取屏幕的高度
    public static int getScreenHeight(Context context) {
        WindowManager manager = (WindowManager) context
                .getSystemService(Context.WINDOW_SERVICE);
        Display display = manager.getDefaultDisplay();
        return display.getHeight();
    }


}
